package com.nhtrinh.sound;

import com.nhtrinh.game.Constant;

import android.content.Context;
import android.media.MediaPlayer;
import android.os.AsyncTask;

public class BackgroundMusic extends AsyncTask<Context, Void, Void> {

	MediaPlayer player;
	@Override
	protected Void doInBackground(Context... arg0) {
		player = MediaPlayer.create(arg0[0], Constant.MUSIC_BACKGROUND);
		player.setLooping(true);
		player.start();
		return null;
	}
	
	public void stop(){
		player.stop();
	}

}
